﻿package 
{

	import flash.display.MovieClip;
	import fl.transitions.Tween;
	import fl.transitions.easing.*;
	import fl.motion.Animator;

	public class Ducks extends MovieClip
	{

		public var duck_animator:Animator;
		public var point:int;
		public function Ducks(pts:int)
		{
			// constructor code
			this.point=pts;
		}
		public function swim()
		{
			var duckSwim:Tween = new Tween(this,"x",None.easeNone,650,-100,4,true);
		}
		public function hit()
		{
			import fl.motion.Animator;
			var duck_xml:XML = <Motion duration="5" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*">
			<source>
			<Source frameRate="24" x="308.55" y="193.4" scaleX="1" scaleY="1" rotation="0" elementType="movie clip" symbolName="ducks" class="Ducks">
			<dimensions>
			<geom:Rectangle left="-32" top="-61.5" width="66" height="61"/>
			</dimensions>
			<transformationPoint>
			<geom:Point x="0.5" y="0.5008196721311475"/>
			</transformationPoint>
			</Source>
			</source>
			
			<Keyframe index="0" tweenSnap="true">
			<tweens>
			<SimpleEase ease="0"/>
			</tweens>
			</Keyframe>
			
			<Keyframe index="4" x="27.94999999999999" y="27.25" scaleX="0.2" scaleY="0.159" rotation="180">
			<color>
			<Color alphaMultiplier="0.06"/>
			</color>
			</Keyframe>
			</Motion>;

			duck_animator = new Animator(duck_xml,this);
			duck_animator.play();

		}
	}

}